//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { CmsBanners, CmsBannersResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooCmsBannersList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<CmsBannersResponse>(`/uctoo/cms_banners/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooCmsBanners = async (id: string) => {
  return requestClient.get<CmsBanners>(`/uctoo/cms_banners/${id}`);
};

export const adductooCmsBanners = async (data: Partial<CmsBanners>) => {
  return requestClient.post<CmsBanners>('/uctoo/cms_banners/add', data);
};

export const edituctooCmsBanners = async (data: Partial<CmsBanners>) => {
  return requestClient.post<CmsBanners>('/uctoo/cms_banners/edit', data);
};

export const deleteuctooCmsBanners = async (id: string) => {
  return requestClient.post<any>('/uctoo/cms_banners/del', { id });
};
